package cn.itcast.order.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

/**
 * @author 虎哥
 *account服务的对外暴露的接口类
 */
@FeignClient("account-service")//从nacos中服务列表中根据服务名称去找对应的ip地址和端口号
public interface AccountClient {

    //扣减余额的接口
    @PutMapping("/account/{userId}/{money}")
    void deduct(@PathVariable("userId") String userId, @PathVariable("money") Integer money);
}
